<?php
	require_once 'mp3\Smarty.php';
	require_once 'mp3\GestionarUsuari.php';
	
	session_start();
	
	$smarty = new mp3_Smarty();
	require 'mp3\ComprovarSessio.php';
	
	if (array_key_exists('canviarPass', $_POST)) {
		if (isset($_SESSION['userid'])) {
			$gu = new Mp3_GestionarUsuari($_SESSION['username']);
			if(isset($_POST['nouPdp']) && $_POST['nouPdp']!='') {
				$resultatEjecucio=$gu->canviarPass($_POST['nouPdp']);				
			}
			header('location:/tardes/mp3/canviarPass.php');
		}
	}
?>